package com.ch.web.entity.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * @author chenHao
 * @email 1429542285@qq.com
 * @date 2022-10-15 13:58:33
 */
@Data
@TableName("xy_comment")
public class XyCommentEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 评论内容
     */
    @NotBlank(message = "评论内容不能为空")
    private String comment;
    /**
     * 评论哪条说说内容
     */
    private Long talkId;
    /**
     * 评论人
     */
    private Long userId;
    /**
     * 评论时间
     */
    private Date createTime;


}
